﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace StateGrid
{
    /// <summary>
    /// Summary description for GlobalMethod
    /// </summary>
    public class GlobalMethod
    {
        /// <summary>
        /// 更正半角分号
        /// </summary>
        /// <param name="str">返回更正后的结果</param>
        /// <returns></returns>
        public static String Semicolon(String str)
        {
            if(null==str||"".Equals(str))
            {
                return str;
            }

            char[] replaceChar = { ',', '，', '；', ':', '：', '?', '？', '%' };
            //String[] replaceChar = { ",", "，", "；", ":", "：","?","？" };
            //逐一替换非法字符
            foreach(char c in replaceChar)
            {
                str=str.Replace(c,';');
            }

            return str;
        }

        public static String EscapeQuote(String str)
        {
            return str;
        }

        public GlobalMethod()
        {
            //
            // TODO: Add constructor logic here
            //
        }
    }
}